<template>
	<div :class="{homenewzone:(newzoneclass=='true')}">
		<!--:class="{homenewzone:(newzoneclass=='true')}" -->
		<img class="newzonebg" :src="newZonedata.publicityPicture ||'static/image/demo7.png'" @click='jumpEvent()' />
	     <!--:style="`height: ${screenHeight}rem`"-->
	     <!--<div v-if="!newZonedata.publicityPicture && env === 'edit'" style="height: 2.5rem;line-height: 2.5rem;">请配置数据</div>-->
	</div>
</template>

<script>
	export default {
		props: {
			newZonedata: {
				type: Object,
				default: () => {}
			},
			screenHeight: {
				type: String,
				default: '3.5'
			},
			newzoneclass: {
				type: String,
				default: 'true'
			},
		},
		data() {
			return {

			}
		},
		components: {

		},
		methods: {
			jumpEvent() {
				if(this.newZonedata.extendField) {
					var urldata = JSON.parse(this.newZonedata.extendField).url.path
					if(urldata) {
						this.$router.push({
							//path: urldata
							name: "MiddleWare",
							params: {
								pageName: urldata
							}
						})
					}
				}
			},
		},
		computed: {
			env() {
				return window.environment; // 获取是否是编辑状态
			},
		},
		mounted() {

		},
	}
</script>

<style>
	.homenewzone {
		background-color: #fff;
		/*padding: 0.75rem 0rem;*/
		padding: 0.75rem;
	}
	.newzonebg {
		margin: 0 auto;
		width: 100%;
		/*height: 3.5rem;*/
		/*border-radius: 4rem;*/
	}
</style>